package com.tyl.xtk.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tyl.xtk.beans.po.UserRoleMap;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;

/**
 * 用户角色映射Mapper接口
 */
public interface UserRoleMapMapper extends BaseMapper<UserRoleMap> {
    
    /**
     * 根据用户ID删除所有角色映射
     * @param userId 用户ID
     */
    @Delete("DELETE FROM user_role_map WHERE user_id = #{userId}")
    void deleteByUserId(@Param("userId") Long userId);
}